package com.sprouting.ops.model;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sprouting.ops.annotations.invoke.CheckIsNullOrEmpty;
import com.sprouting.ops.annotations.invoke.CheckLength;
import com.sprouting.ops.annotations.invoke.CheckNotNull;
import com.sprouting.ops.interfaces.AddGroup;
import com.sprouting.ops.interfaces.UpdGroup;
import lombok.Data;

/**
 * (应用分支(版本)表)表实体类
 *
 * @author longx
 * @since 2023-11-20 10:53:14
 */
@Data
@TableName("ops_app_branch")
public class OpsAppBranch extends BaseModel {

    /**
     * 主键
     */
    @CheckNotNull(message = "非法ID", groups = UpdGroup.class)
    @CheckIsNullOrEmpty(message = "无效ID", groups = AddGroup.class)
    @TableId
    private String id;
    /**
     * 应用ID
     * @see OpsApp#getId()
     */
    @CheckNotNull(message = "请选择所属应用")
    private String appId;
    /**
     * 分支名称
     * 并不是说分支的实际名称，而是分支的说明名称，比如 XX通讯分支，xx考试分支
     */
    @CheckLength(min = 1, max = 150, message = "分支名称超过长度限制")
    @CheckNotNull(message = "请输入分支名称")
    private String branchName;
    /**
     * 分支简介
     */
    @CheckLength(max = 1000, message = "分支简介超过长度限制")
    // @CheckNotNull(message = "请输入分支简介")
    private String introduce;
    /**
     * 维护状态，持续维护、已停止
     * @see com.sprouting.ops.interfaces.ConstantBase.MaintenanceStatus
     */
    private Integer status;

}

